USE C:\GESVISUAL\DADOS\TAB_TAB_CODPAG IN 0 ALIAS T_CODPAG
USE C:\GESVISUAL\DADOS\SEC_TAB_ALUANO IN 0 ALIAS T_ALUANO
USE C:\GESVISUAL\DADOS\FIN_TAB_CARNES IN 0 ALIAS T_CARNES

DO WHILE NOT EOF("T_CARNES")
   SELECT T_ALUANO
   SET ORDER TO ALUANO4
   SEEK T_CARNES.MATRIC
   IF NOT EOF()
      SELECT T_CODPAG
      SET ORDER TO CODPAG1
      SEEK "2003"+T_ALUANO.CODPAG
      WCONTA=CONVAL
      SELECT T_CARNES
      REPLACE CONTA WITH WCONTA
   ENDIF
   SKIP IN "T_CARNES"   
ENDDO


